package com.ty.dao;

import cn.smart.core.annotation.PageX;
import com.ty.entity.ProductPrice;
import com.ty.entity.ProductPriceQuery;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Update;

import java.util.List;

@Mapper
public interface ProductPriceDao {
    @PageX
    List<ProductPrice> select (ProductPriceQuery query);
    Integer insert(ProductPrice productPrice);
    Integer insertBatch(List<ProductPrice> productPrices);
    Integer update(ProductPrice productPrice);
    @Update("update `212_product_price` set status = 0 where productId =#{productId} and status = 1")
    Integer updateOldPriceStatus(Integer productId);
    Integer delete (Integer id);


}
